import Vue from 'vue'
import App from './App'
import router from './router'
import iView from 'iview';
import store from './store/store'
import 'iview/dist/styles/iview.css'; // 使用 CSS
import axios from 'axios'
import api from "./api/api"
Vue.prototype.api = api
Vue.prototype.router = router
Vue.config.productionTip = false
Vue.use(iView)
Vue.filter('filterTime', (time) => {
		if (time) {
			var oDate = new Date();
			oDate.setTime(time);
			var y = oDate.getFullYear();
			var m = oDate.getMonth() + 1;
			var d = oDate.getDate();
			var h = oDate.getHours();
			var mm = oDate.getMinutes();
			var s = oDate.getSeconds();
			var week = "";
			switch (oDate.getDay()) {
				case 0:
					week = "星期天";
					break
				case 1:
					week = "星期一";
					break
				case 2:
					week = "星期二";
					break
				case 3:
					week = "星期三";
					break
				case 4:
					week = "星期四";
					break
				case 5:
					week = "星期五";
					break
				case 6:
					week = "星期六";
					break
			}
			return y + '.' + m + '.' + d + ' ' + week;
		}
	})
	/* eslint-disable no-new */
new Vue({
	el: '#app',
	router,
	store,
	render: h => h(App)
})